#pragma once

#include "util/c99defs.hpp"

enum cat_mouse_button_type {
	MOUSE_LEFT,
	MOUSE_RIGHT,
	MOUSE_MIDDLE,
	MOUSE_X1,
	MOUSE_X2
};
struct cat_mouse_click_event {
	cat_mouse_button_type _button;
};

struct cat_mouse_move_event {
	int32_t x;
	int32_t y;
};

struct cat_key_event {
	uint32_t native_vkey;
};

struct cat_joystick_axis_move_event {
	uint32_t axisid;
	int32_t value;
};

struct cat_joystick_button_event {
	uint32_t native_vkey;
};

enum cat_joystick_hat {
	HAT_CENTERED  =  0x00,
	HAT_UP         = 0x01,
	HAT_RIGHT      = 0x02,
	HAT_DOWN       = 0x04,
	HAT_LEFT       = 0x08,
	HAT_RIGHTUP    = (HAT_RIGHT|HAT_UP),
	HAT_RIGHTDOWN  = (HAT_RIGHT|HAT_DOWN),
	HAT_LEFTUP     = (HAT_LEFT|HAT_UP),
	HAT_LEFTDOWN   = (HAT_LEFT|HAT_DOWN),
};
struct cat_joystick_hat_event {
	uint32_t flag;
};